home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / MacWT 0.04 / wt / wt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-31  |  2.6 KB  |  99 lines  |  [TEXT/MMCC]

  1. /*
  2. **  wt -- a 3d game engine
  3. **
  4. **  Copyright (C) 1994 by Chris Laurel
  5. **  email:  claurel@mr.net
  6. **  snail mail:  Chris Laurel, 5700 W Lake St #208,  St. Louis Park, MN  55416
  7. **
  8. **  This program is free software; you can redistribute it and/or modify
  9. **  it under the terms of the GNU General Public License as published by
  10. **  the Free Software Foundation; either version 2 of the License, or
  11. **  (at your option) any later version.
  12. **
  13. **  This program is distributed in the hope that it will be useful,
  14. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. **  GNU General Public License for more details.
  17. **
  18. **  You should have received a copy of the GNU General Public License
  19. **  along with this program; if not, write to the Free Software
  20. **  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22.  
  23. #if defined(macintosh) || defined(__MWERKS__)
  24. #include "mac_wt.h"
  25. #endif    /* mac? */
  26.  
  27.  
  28. /* directory and file configuration */
  29. #define TEXTURE_PATH "textures"
  30. #define DEFAULT_WORLD_FILE "test.world"
  31. #define DEFAULT_PALETTE_FILE "wt.pal"
  32.  
  33. #ifndef MIN
  34. #define MIN(a, b) ((a) < (b) ? (a) : (b))
  35. #endif
  36. #ifndef MAX
  37. #define MAX(a, b) ((a) > (b) ? (a) : (b))
  38. #endif
  39.  
  40. #ifndef    GotFalseTrueBoolean
  41. #ifndef False
  42. typedef enum { False, True } Boolean;
  43. #else
  44. #ifndef Boolean
  45. #define Boolean int
  46. #endif    /* ndef Boolean */
  47. #endif    /* ndef False */
  48. #endif    /* ndef GotFalseTrueBoolean */
  49.  
  50. #if !defined(__GNUC__) && !defined(GOT_INLINE)
  51. #define inline
  52. #endif
  53.  
  54. /* For compilers without NULL defined in stdlib.h */
  55. #ifndef NULL
  56. #include <stdio.h>
  57. #endif
  58.  
  59. /* More compatibility stuff . . . */
  60. #ifndef PATH_MAX
  61. #ifdef _POSIX_PATH_MAX
  62. #define PATH_MAX _POSIX_PATH_MAX
  63. #else
  64. #define PATH_MAX 1024
  65. #endif
  66. #endif
  67.  
  68. #ifndef EXIT_FAILURE
  69. #define EXIT_FAILURE 1
  70. #endif
  71. #ifndef EXIT_SUCCESS
  72. #define EXIT_SUCCES 0
  73. #endif
  74.  
  75. /* Given a PC palette index, return a host one suitable for blatting
  76. ** into an offscreen pixmap. Most hosts will have a 1:1 mapping here.
  77. */
  78.  
  79. #ifndef HostIndexFromPCIndex
  80. #define    HostIndexFromPCIndex(x)    (x)
  81. #endif
  82.  
  83. /* HostDirFileStr -- define a "printf()" string which, given a
  84. ** directory and a filename, munges them together to produce a
  85. ** pathname suitable for passing to fopen().
  86. */
  87. #ifndef    HostDirFileStr
  88. #define    HostDirFileStr    "%s/%s"        /* i.e., "directory/filename" */
  89. #endif
  90.  
  91. /* HostFixupPixelData -- allow a host to whizz through a buffer
  92. ** containing pixel data and possibly alter it in some evil fashion.
  93. ** Only the Mac does this at the mo...
  94. */
  95. #ifndef    HostFixupPixelData
  96. #define    HostFixupPixelData(buf, nBytes)    /* nothing */
  97. #endif
  98.  
  99.